<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const arr = [1, 2, 3, 4, 5];

      // arr.join = function () {
      //   // this [1, 2, 3, 4, 5]
      // };
      console.log(arr.join());
      console.log(arr.join.call([3, 4, 5, 6]));
      // 类数组对象
      console.log(arr.join.call({ 0: "c", 1: "b", 2: "a", length: 3 }));
    </script>
  </body>
</html>
